import request from './request'

export function getCategoryAPI(id) {// 报错id is not defined 未传参
    return request({
        url: '/category',
        params: {
            id
        }
    })
}

// 二级面包屑分类

export function getSubCategory(id) {
    return request({
        url: '/category/sub/filter',
        params: {
            id
        }
    })
}



// 获取面包屑下商品数据

/**
 * @description: 获取导航数据
 * @data { 
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   } 
 * @return {*}
 */

   export function getCategoryFilter(data) {
    return request({
        url: 'category/goods/temporary',
        method: 'POST',
        data   
    })
}

